package cn.ddiancan.xddcloud.psc.flow.feign;

import java.util.List;

import cn.ddiancan.xddcloud.psc.flow.entity.XddHisTaskActor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 历史任务参与者数据访问层接口
 */
@FeignClient(contextId = "XddHisTaskActorService", name = "xddcloud-flow-server")
public interface XddHisTaskActorRemoteService {

    @PostMapping("/flow/hisTaskActor/insert")
    boolean insert(@RequestBody XddHisTaskActor hisTaskActor);

    @DeleteMapping("/flow/hisTaskActor/deleteByIds")
    boolean deleteByInstanceIds(@RequestBody List<Long> instanceIds);

    @DeleteMapping("/flow/hisTaskActor/deleteById/{taskId}")
    boolean deleteByTaskId(@PathVariable("taskId") Long taskId);

    @GetMapping("/flow/hisTaskActor/selectListByTaskId/{taskId}")
    List<XddHisTaskActor> selectListByTaskId(@PathVariable("taskId") Long taskId);

    @PostMapping("/flow/hisTaskActor/selectListByTaskIds")
    List<XddHisTaskActor> selectListByTaskIds(@RequestBody List<Long> taskIds);

    @GetMapping("/flow/hisTaskActor/selectListByTaskIdAndActorId/{taskId}/{actorId}")
    List<XddHisTaskActor> selectListByTaskIdAndActorId(@PathVariable("taskId") Long taskId,
        @PathVariable("actorId") Long actorId);
}
